import 'package:flutter/material.dart';
import 'package:rainflutter/pages/animation/animation.dart';
import 'package:rainflutter/pages/animation/path_animation.dart';
import 'package:rainflutter/pages/controller/bili_wang/count_down_btn.dart';
import 'package:rainflutter/pages/controller/bili_wang/custom_multi_child_layout.dart';
import 'package:rainflutter/pages/controller/bili_wang/hollow_out.dart';
import 'package:rainflutter/pages/controller/bili_wang/my_render_box.dart';
import 'package:rainflutter/pages/controller/bili_wang/sliver_01.dart';
import 'package:rainflutter/pages/controller/bili_wang/sliver_02.dart';
import 'package:rainflutter/pages/controller/bili_wang/sliver_03.dart';
import 'package:rainflutter/pages/controller/bili_wang/stack_test.dart';
import 'package:rainflutter/pages/controller/bili_wang/water_mark.dart';
import 'package:rainflutter/pages/controller/flutter_life.dart';
import 'package:rainflutter/pages/controller/footer_header.dart';
import 'package:rainflutter/pages/controller/line.dart';
import 'package:rainflutter/pages/controller/page/async/yibu.dart';
import 'package:rainflutter/pages/controller/page/boom_sheet.dart';
import 'package:rainflutter/pages/controller/page/child_test.dart';
import 'package:rainflutter/pages/controller/page/custom_painter.dart';
import 'package:rainflutter/pages/controller/page/dcp_comments.dart';
import 'package:rainflutter/pages/controller/page/eg_extended_tabs.dart';
import 'package:rainflutter/pages/controller/page/enterprise_comments.dart';
import 'package:rainflutter/pages/controller/page/environment_assort.dart';
import 'package:rainflutter/pages/controller/page/function/dcp_cache.dart';
import 'package:rainflutter/pages/controller/page/function/dcp_tab_vc.dart';
import 'package:rainflutter/pages/controller/page/function/html_tags.dart';
import 'package:rainflutter/pages/controller/page/function/new_button.dart';
import 'package:rainflutter/pages/controller/page/function/open_list.dart';
import 'package:rainflutter/pages/controller/page/function/picture_takephoto.dart';
import 'package:rainflutter/pages/controller/page/function/refresh_gridview.dart';
import 'package:rainflutter/pages/controller/page/function/refresh_listview.dart';
import 'package:rainflutter/pages/controller/page/function/scaffold_route.dart';
import 'package:rainflutter/pages/controller/page/isolate/isolate.dart';
import 'package:rainflutter/pages/controller/page/layout/layoutTest.dart';
import 'package:rainflutter/pages/controller/page/liquid_progress.dart';
import 'package:rainflutter/pages/controller/page/list/list_optimised.dart';
import 'package:rainflutter/pages/controller/page/list/staggered_grid.dart';
import 'package:rainflutter/pages/controller/page/my_comments.dart';
import 'package:rainflutter/pages/controller/page/park_enterprises.dart';
import 'package:rainflutter/pages/controller/page/park_news.dart';
import 'package:rainflutter/pages/controller/page/percent_indicator.dart';
import 'package:rainflutter/pages/controller/page/provide/inherited_change_test.dart';
import 'package:rainflutter/pages/controller/page/provide/inherited_test.dart';
import 'package:rainflutter/pages/controller/page/provide/provider_change_test.dart';
import 'package:rainflutter/pages/controller/page/provide/provider_test.dart';
import 'package:rainflutter/pages/controller/page/tab_vc.dart';
import 'package:rainflutter/pages/controller/page/tabbar_indicator.dart';
import 'package:rainflutter/pages/controller/page/watch_timer.dart';
import 'package:rainflutter/pages/controller/page/zhediebar.dart';
import 'package:rainflutter/pages/controller/study/asyncBuilder.dart';
import 'package:rainflutter/pages/controller/study/hidden.dart';
import 'package:rainflutter/pages/controller/study/ketTest1.dart';
import 'package:rainflutter/pages/controller/study/keyTest.dart';
import 'package:rainflutter/pages/controller/study/oblique.dart';
import 'package:rainflutter/pages/controller/study/optimize.dart';
import 'package:rainflutter/pages/controller/study/repaint_boundary.dart';
import 'package:rainflutter/pages/controller/study/statefulBuilder.dart';
import 'package:rainflutter/pages/controller/value/block_tesk.dart';
import 'package:rainflutter/pages/controller/widget/sc_bar.dart';
import 'package:rainflutter/pages/controller/widget/shan_chu.dart';
import 'package:rainflutter/pages/controller/widget/textfield.dart';
import 'package:rainflutter/pages/controller/widget/toast_test.dart';
import 'package:rainflutter/pages/demo/left_scroll_actions.dart';
import 'package:rainflutter/pages/leetcode/leetcode.dart';
import 'package:rainflutter/pages/tabsave/tab_header.dart';

class Routes {
  /// GlobalKey
  static GlobalKey<NavigatorState> navigatorKey = GlobalKey();

  /// root
  static const MyHomePage = "/";
  static const String ParkEnterprises = '/park_enterprises';
  static const String EnvironmentAssort = '/environment_assort';
  static const String ParkNews = '/park_news';
  static const String BlockTest = '/block_test';
  static const String Child = '/child';
  static const String DcpComments = '/comments';
  static const String DcpMyComments = '/mycomments';
  static const String DcpEnterpriseComments = '/enterpriseComments';
  static const String ListviewRefresh = '/refListview';
  static const String GridviewRefresh = '/refGridview';
  static const String ToastTest = '/toast';
  static const String NsuserDefault = '/cache';
  static const String RtextField = '/textfield';
  static const String DcpTabPageVC = '/pagevc';
  static const String CeHuaShanChu = '/cehuashanchu';
  static const String HtmlTags2 = '/htmltags';
  static const String LifecycleAppPage = '/flutterlife';
  static const String PictureTakePhoto = '/photopicture';
  static const String SCBar = '/scbar';
  static const String FotterHeader = '/fltterheader';
  static const String TabBarAways = '/tabbaraways';
  static const String MyAnimation = '/animation';
  static const String PathAnimation = '/path_animation';
  static const String LeetCode = '/leetcode';
  static const String NewButton = '/newbutton';
  static const String AsyncAwait = '/yibu';
  static const String IsolateTest = '/isolate';
  static const String ObliqueList = '/oblique';
  static const String HiddenWidget = '/hidden';
  static const String FutureBuilderTest = '/future_builder_test';
  static const String KeyTest = '/keytest';
  static const String StatefulBuilderTest = '/stateful_builder_test';
  static const String LayoutTest = '/layout';
  static const String OptimizeTest = '/optimize';
  static const String RepaintBoundaryTest = '/repaint_boundary';
  static const String KeyTest1 = '/key_test_1';
  static const String ListOptimised = '/list_optimised';
  static const String InheritedTest = '/inherited_test';
  static const String InheritedChangeTest = '/inherited_change_test';
  static const String ProviderTest = '/provider_test';
  static const String ProviderChangeTest = '/provider_change_test';
  static const String ScaffoldRoute = '/scaffold_route';
  static const String StaggeredGrid = '/staggered_grid';
  static const String StackTest = '/stack_test';
  static const String CustomMultiChildLayoutTest = '/custom_multi_child_layout';
  static const String MyRenderWidget = '/my_render_widget';
  static const String HollowOutTest = '/hollow_outTest';
  static const String WaterMark = '/water_mark';
  static const String PercentIndicator = '/percent_indicator';
  static const String UserTabVc = '/user_tabVc';
  static const String EGExtendedTabs = '/extended_tabs';
  static const String TabbarMagicIndicator = '/tabbar_magic_indicator';
  static const String MyCustomPainterTest = '/custom_painter_test';
  static const String ExpansionPanelListTest = '/expansion_panel_list_test';
  static const String CountDownBtnTest = '/count_down_btn_test';
  static const String Sliver01 = '/sliver_01';
  static const String Sliver02 = '/sliver_02';
  static const String Sliver03 = '/sliver_03';

  static const String LeftScrollActions = '/left_scroll_actions';

  static const String ZheDieBar = '/zhe_die_bar';

  static const String WatchTimer = '/watch_timer';
  static const String LineTestPage = '/line_test_page';
  static const String Sheet = '/sheet';

  static const String LiquidProgress = '/liquid_progress';
}

/// 路由表
final Map<String, WidgetBuilder> routeTable = {
  Routes.ParkEnterprises: (context) => ParkEnterprises(),
  Routes.EnvironmentAssort: (context) => EnvironmentAssort(),
  Routes.ParkNews: (context) => ParkNews(),
  Routes.BlockTest: (context) => BlockTest(),
  Routes.Child: (context) => Child(),
  Routes.DcpComments: (context) => DcpComments(),
  Routes.DcpMyComments: (context) => DcpMyComments(),
  Routes.DcpEnterpriseComments: (context) => DcpEnterpriseComments(),
  Routes.ListviewRefresh: (context) => ListviewRefresh(),
  Routes.GridviewRefresh: (context) => GridviewRefresh(),
  Routes.ToastTest: (context) => ToastTest(),
  Routes.NsuserDefault: (context) => NsuserDefault(),
  Routes.RtextField: (context) => RtextField(),
  Routes.DcpTabPageVC: (context) => DcpTabPageVC(),
  Routes.CeHuaShanChu: (context) => CeHuaShanChu(),
  Routes.HtmlTags2: (context) => HtmlTags2(),
  Routes.LifecycleAppPage: (context) => LifecycleAppPage(),
  Routes.PictureTakePhoto: (context) => PictureTakePhoto(),
  Routes.SCBar: (context) => SCBar(),
  Routes.FotterHeader: (context) => FotterHeader(),
  Routes.TabBarAways: (context) => TabBarAways(),
  Routes.MyAnimation: (context) => MyAnimation(),
  Routes.PathAnimation: (context) => PathAnimation(),
  Routes.LeetCode: (context) => LeetCode(),
  Routes.NewButton: (context) => NewButton(),
  Routes.AsyncAwait: (context) => AsyncAwait(),
  Routes.IsolateTest: (context) => IsolateTest(),
  Routes.ObliqueList: (context) => ObliqueList(),
  Routes.HiddenWidget: (context) => HiddenWidget(),
  Routes.FutureBuilderTest: (context) => FutureBuilderTest(),
  Routes.KeyTest: (context) => KeyTest(),
  Routes.StatefulBuilderTest: (context) => StatefulBuilderTest(),
  Routes.LayoutTest: (context) => LayoutTest(),
  Routes.OptimizeTest: (context) => OptimizeTest(),
  Routes.RepaintBoundaryTest: (context) => RepaintBoundaryTest(),
  Routes.KeyTest1: (context) => KeyTest1(),
  Routes.ListOptimised: (context) => ListOptimised(),
  Routes.InheritedTest: (context) => InheritedTest(),
  Routes.InheritedChangeTest: (context) => InheritedChangeTest(),
  Routes.ProviderTest: (context) => ProviderTest(),
  Routes.ProviderChangeTest: (context) => ProviderChangeTest(),
  Routes.ScaffoldRoute: (context) => ScaffoldRoute(),
  Routes.StaggeredGrid: (context) => StaggeredGrid(),
  Routes.StackTest: (context) => StackTest(),
  Routes.CustomMultiChildLayoutTest: (context) => CustomMultiChildLayoutTest(),
  Routes.MyRenderWidget: (context) => MyRenderWidget(),
  Routes.HollowOutTest: (context) => HollowOutTest(),
  Routes.WaterMark: (context) => WaterMark(),
  Routes.PercentIndicator: (context) => PercentIndicator(),
  Routes.UserTabVc: (context) => UserTabVc(),
  Routes.EGExtendedTabs: (context) => EGExtendedTabs(),
  Routes.TabbarMagicIndicator: (context) => TabbarMagicIndicator(),
  Routes.MyCustomPainterTest: (context) => MyCustomPainterTest(),
  Routes.ExpansionPanelListTest: (context) => ExpansionPanelListTest(),
  Routes.CountDownBtnTest: (context) => CountDownBtnTest(),
  Routes.Sliver01: (context) => Sliver01(),
  Routes.Sliver02: (context) => Sliver02(),
  Routes.Sliver03: (context) => Sliver03(),
  Routes.LeftScrollActions: (context) => LeftScrollActions(),
  Routes.ZheDieBar: (context) => ZheDieBar(),
  Routes.WatchTimer: (context) => WatchTimer(),
  Routes.LineTestPage: (context) => LineTestPage(),
  Routes.Sheet: (context) => Sheet(),
  Routes.LiquidProgress: (context) => LiquidProgress(),
};

final List<Map<String, dynamic>> chickList = [
  {
    'index': '63',
    'name': '水球',
    'routes': Routes.LiquidProgress,
    'arguments': null,
  },
  {
    'index': '62',
    'name': '下弹框',
    'routes': Routes.Sheet,
    'arguments': null,
  },
  {
    'index': '61',
    'name': '列表竖线',
    'routes': Routes.LineTestPage,
    'arguments': null,
  },
  {
    'index': '60',
    'name': '倒计时',
    'routes': Routes.WatchTimer,
    'arguments': null,
  },
  {
    'index': '59',
    'name': '折叠bar',
    'routes': Routes.ZheDieBar,
    'arguments': null,
  },
  {
    'index': '58',
    'name': 'B-Sliver03',
    'routes': Routes.Sliver03,
    'arguments': null,
  },
  {
    'index': '57',
    'name': 'B-LeftScrollActions',
    'routes': Routes.LeftScrollActions,
    'arguments': null,
  },
  {
    'index': '56',
    'name': 'B-Sliver02',
    'routes': Routes.Sliver02,
    'arguments': null,
  },
  {
    'index': '55',
    'name': 'B-Sliver01',
    'routes': Routes.Sliver01,
    'arguments': null,
  },
  {
    'index': '54',
    'name': 'B-send按钮',
    'routes': Routes.CountDownBtnTest,
    'arguments': null,
  },
  {
    'index': '53',
    'name': '展开闭合列表',
    'routes': Routes.ExpansionPanelListTest,
    'arguments': null,
  },
  {
    'index': '52',
    'name': '划线测试',
    'routes': Routes.MyCustomPainterTest,
    'arguments': null,
  },
  {
    'index': '51',
    'name': 'tab分栏控制器',
    'routes': Routes.TabbarMagicIndicator,
    'arguments': null,
  },
  {
    'index': '50',
    'name': 'EGExtendedTabs轮子',
    'routes': Routes.EGExtendedTabs,
    'arguments': null,
  },
  {
    'index': '49',
    'name': '自定义tab',
    'routes': Routes.UserTabVc,
    'arguments': null,
  },
  {
    'index': '48',
    'name': '进度条',
    'routes': Routes.PercentIndicator,
    'arguments': null,
  },
  {
    'index': '47',
    'name': '水印',
    'routes': Routes.WaterMark,
    'arguments': null,
  },
  {
    'index': '46',
    'name': '镂空文字',
    'routes': Routes.HollowOutTest,
    'arguments': null
  },
  {
    'index': '45',
    'name': '自定义render',
    'routes': Routes.MyRenderWidget,
    'arguments': null
  },
  {
    'index': '44',
    'name': 'CustomMultiChildLayout',
    'routes': Routes.CustomMultiChildLayoutTest,
    'arguments': null
  },
  {
    'index': '43',
    'name': 'stack',
    'routes': Routes.StackTest,
    'arguments': null
  },
  {
    'index': '42',
    'name': 'StaggeredGrid',
    'routes': Routes.StaggeredGrid,
    'arguments': null
  },
  {
    'index': '41',
    'name': 'ScaffoldRoute',
    'routes': Routes.ScaffoldRoute,
    'arguments': null
  },
  {
    'index': '40',
    'name': 'LayoutTest',
    'routes': Routes.LayoutTest,
    'arguments': null
  },
  {
    'index': '39',
    'name': 'ProviderChange',
    'routes': Routes.ProviderChangeTest,
    'arguments': null
  },
  {
    'index': '38',
    'name': 'Provider',
    'routes': Routes.ProviderTest,
    'arguments': null
  },
  {
    'index': '37',
    'name': 'InheritedChange',
    'routes': Routes.InheritedChangeTest,
    'arguments': null
  },
  {
    'index': '36',
    'name': 'Inherited',
    'routes': Routes.InheritedTest,
    'arguments': null
  },
  {
    'index': '35',
    'name': 'list图片加载优化',
    'routes': Routes.ListOptimised,
    'arguments': null
  },
  {
    'index': '34',
    'name': 'keytest1',
    'routes': Routes.KeyTest1,
    'arguments': null
  },
  {
    'index': '33',
    'name': '隔离渲染优化',
    'routes': Routes.RepaintBoundaryTest,
    'arguments': null
  },
  {
    'index': '32',
    'name': 'OptimizeTest',
    'routes': Routes.OptimizeTest,
    'arguments': null
  },
  {
    'index': '31',
    'name': '局部刷新',
    'routes': Routes.StatefulBuilderTest,
    'arguments': null
  },
  {
    'index': '30',
    'name': 'KeyTest',
    'routes': Routes.KeyTest,
    'arguments': null
  },
  {
    'index': '29',
    'name': '异步更新UI',
    'routes': Routes.FutureBuilderTest,
    'arguments': null
  },
  {
    'index': '28',
    'name': '隐藏控件',
    'routes': Routes.HiddenWidget,
    'arguments': null
  },
  {
    'index': '27',
    'name': '倾斜布局',
    'routes': Routes.ObliqueList,
    'arguments': null
  },
  {
    'index': '26',
    'name': 'isolate',
    'routes': Routes.IsolateTest,
    'arguments': null
  },
  {'index': '25', 'name': '异步', 'routes': Routes.AsyncAwait, 'arguments': null},
  {'index': '24', 'name': '新按钮', 'routes': Routes.NewButton, 'arguments': null},
  {'index': '23', 'name': '力扣', 'routes': Routes.LeetCode, 'arguments': null},
  {
    'index': '22',
    'name': '动画1',
    'routes': Routes.PathAnimation,
    'arguments': null
  },
  {
    'index': '21',
    'name': '动画',
    'routes': Routes.MyAnimation,
    'arguments': null
  },
  {
    'index': '20',
    'name': '不放tabbar',
    'routes': Routes.TabBarAways,
    'arguments': null
  },
  {
    'index': '19',
    'name': '添加头脚',
    'routes': Routes.FotterHeader,
    'arguments': null
  },
  {'index': '18', 'name': 'scbar', 'routes': Routes.SCBar, 'arguments': null},
  {
    'index': '17',
    'name': '相片相册',
    'routes': Routes.PictureTakePhoto,
    'arguments': null
  },
  {
    'index': '16',
    'name': 'flutter生命周期',
    'routes': Routes.LifecycleAppPage,
    'arguments': null
  },
  {
    'index': '15',
    'name': 'html标签显示',
    'routes': Routes.HtmlTags2,
    'arguments': {
      'params': {'11': '22'},
      'str': "111",
    }
  },
  {
    'index': '14',
    'name': '侧滑删除',
    'routes': Routes.CeHuaShanChu,
    'arguments': null
  },
  {
    'index': '13',
    'name': '分栏控制器',
    'routes': Routes.DcpTabPageVC,
    'arguments': null
  },
  {
    'index': '12',
    'name': '带X文本框',
    'routes': Routes.RtextField,
    'arguments': null
  },
  {
    'index': '11',
    'name': '传值跳转',
    'routes': Routes.BlockTest,
    'arguments': null
  },
  {
    'index': '10',
    'name': '本地缓存',
    'routes': Routes.NsuserDefault,
    'arguments': null
  },
  {
    'index': '9',
    'name': 'toast测试',
    'routes': Routes.ToastTest,
    'arguments': null
  },
  {
    'index': '8',
    'name': '刷新grid',
    'routes': Routes.GridviewRefresh,
    'arguments': null
  },
  {
    'index': '7',
    'name': '刷新list',
    'routes': Routes.ListviewRefresh,
    'arguments': null
  },
  {
    'index': '6',
    'name': '企业评价',
    'routes': Routes.DcpEnterpriseComments,
    'arguments': null
  },
  {
    'index': '5',
    'name': '我的评论',
    'routes': Routes.DcpMyComments,
    'arguments': null
  },
  {'index': '4', 'name': '评论', 'routes': Routes.DcpComments, 'arguments': null},
  {'index': '3', 'name': '子类', 'routes': Routes.Child, 'arguments': null},
  {'index': '2', 'name': '园区动态', 'routes': Routes.ParkNews, 'arguments': null},
  {
    'index': '1',
    'name': '环境配套',
    'routes': Routes.EnvironmentAssort,
    'arguments': null
  },
  {
    'index': '0',
    'name': '园区企业',
    'routes': Routes.ParkEnterprises,
    'arguments': null
  },
];
